﻿@using P2PWeb.Common;
<div class="loan_sides">
    @foreach (MenuCategory category in @MenuHelper.MenuCategorys
        .Where(w=>w.Menus.Any(a=>BaseController.CanAcess(HttpContext.Current ,a.AccountAuthorize))))
    {
        bool selectedCategory=category.Menus.Any(a=>string.Compare(a.ControllerName.Trim(),(ViewContext.RouteData.Values["controller"]+"").Trim(),true)==0);
        <div class="field_box mb20">
            <span class="dot1 @(selectedCategory?string.Empty:"vh")"></span>
            <div class="field_box_t"></div>
            <div class="field_box_m">
                <div class="field_box_content rel">
                    <h3 class="@category.Name headline">@category.Title</h3>
                    <ul class="headline_list">
                        @foreach (Menu menu in category.Menus.Where(w=>BaseController.CanAcess(HttpContext.Current,w.AccountAuthorize)))
                        {
                            bool selectedMenu=string.Compare(menu.ControllerName.Trim(),(ViewContext.RouteData.Values["controller"]+"").Trim(),true)==0;
                          <li class="@(selectedMenu?"cur":string.Empty)">@Html.ActionLink(menu.Name,menu.ActionName,menu.ControllerName)</li>
                        }
                    </ul>
                </div>
            </div>
            <div class="field_box_b"></div>
        </div>
    }
</div>
